package pers.cz.service.impl;

import pers.cz.business.HotSweapBusiness;
import pers.cz.model.AutoHostsDel;
import pers.cz.pub.BeanHelper;
import pers.cz.service.HotSwapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: PostGirl-panent
 * @description: HotSweapServiceImpl
 * @author: Cheng Zhi
 * @create: 2021-11-28 16:37
 **/
@Service
public class HotSwapServiceImpl implements HotSwapService {

    @Autowired
    BeanHelper beanHelper;

    @Override
    public Integer addHosts(AutoHostsDel autoHostsDel) {

        HotSweapBusiness business = new HotSweapBusiness();
        business.setMapper(beanHelper);

        return business.addAutoHostsDel(autoHostsDel);
    }

    @Override
    public Integer deleteHosts(Integer id) {

        HotSweapBusiness business = new HotSweapBusiness();
        business.setMapper(beanHelper);

        return business.deleteAutoHostsDel(id);
    }

    @Override
    public Integer updateHosts(AutoHostsDel autoHostsDel) {
        return null;
    }

    @Override
    public List<AutoHostsDel> queryAutoHostsDelByPage(Integer pageStart, Integer pageLimit) {
        return null;
    }

    @Override
    public List<AutoHostsDel> queryAllAutoHostsDel() {

        HotSweapBusiness business = new HotSweapBusiness();
        business.setMapper(beanHelper);

        return business.queryAllAutoHostsDel();
    }

    @Override
    public String queryPassword(Integer id) {
        return null;
    }
}
